<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>Wifi连接</title>

    <!--可无视-->
    <link rel="stylesheet" type="text/css" href="/static/css/normalize.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/reset.css">

    <!--布局样式，意义不大-->
    <link rel="stylesheet" href="/static/css/demo.css">

    <!--核心样式-->
    <link rel="stylesheet" href="/static/dist/css/ckin.css">
    <link href="/static/logo.png" rel="SHORTCUT ICON">
    <style>
        * {
            margin: 0;
            padding: 0;
            border: 0;
        }

        #benner {
            width: 100%;
            height: 340px;
            /*margin-left: 15%;*/
            /*margin-top: 10px;*/
        }

        #benner .imga {
            display: none;
        }

        #benner .img .active {
            display: block;
        }

        #benner .title {
            width: 0px;
            height: 0px;
            /*background-color: rgba(226, 226, 226, 0.6);*/
            /*border-radius: 30px;*/
            margin-top: -35px;
            /*margin-right: 10px;*/
            float: right;
            margin-left: 40%;
            margin-right: 20%;
            padding: 6px 0px 0px 10px;
            position: relative;
        }

        #benner .title .nr {
            list-style: none;
            width: 0px;
            height: 0px;
            background: #fff;
            /*border-radius: 10px;*/
            float: left;
            margin-right: 10px;
            margin-bottom: 0px;
        }

        #benner .title .active {
            background: #db192a;
        }

    </style>

</head>
<body>

<!--<section class="demo-section demo-section&#45;&#45;light" id="demo">-->
<!--<div class="container">-->
<!--<h2 class="title heading">Custom HTML5 Video Player with Ckins...</h2>-->
<!---->
<!---->
<!--<video poster="/static/media/ckin.jpg" src="/static/media/{{ vedio_name }}" data-ckin="default" data-overlay="1" data-title="The curious case of Chameleon..."></video>-->
<!--</div>-->
<!--</section>-->
<div style="text-align:center;clear:both;">
    <!--<script src="/static/gg_bd_ad_720x90.js" type="text/javascript"></script>-->
    <!--<script src="/static/follow.js" type="text/javascript"></script>-->
</div>
<section class="demo-section" id="skins">
    <div class="">
        <!--<h2 class="title heading">目录</h2>-->
        <!--<ul class="demo-list">-->
        <!--{% for one in data %}-->
        <!--<li class="demo-list__item">-->
        <!--<a href="/vedio/{{ one.name }}">-->
        <!--<img src="/static/media_img/{{ one.path }}" class="nav__logo" alt="无法显示">-->
        <!--<h2 class="coming-soon">{{ one.title }}</h2>-->
        <!--</a>-->
        <!--</li>-->
        <!--{% endfor %}-->
        <!--&lt;!&ndash;<p></p>&ndash;&gt;-->
        <!--&lt;!&ndash;<li class="demo-list__item">&ndash;&gt;-->
        <!--&lt;!&ndash;<img src="/static/logo.png" class="nav__logo" alt="Ckin">&ndash;&gt;-->
        <!--&lt;!&ndash;<h2 class="coming-soon">More ckins coming soon...</h2>&ndash;&gt;-->
        <!--&lt;!&ndash;</li>&ndash;&gt;-->
        <!--</ul>-->
        <div style="text-align: center">
            <img src="/static/logo.png" class="" alt="" width="40%" height="40%">
            <p class="" style="font-size: 10px;color: #0f0f0f;">
                <b>
                    成立于1949年12月底的重庆市歌舞团，是一个集合舞蹈、声乐、舞台工程设计制作、舞美设备租赁、服装租赁、艺术培训、演出策划营销的大型综合性表演艺术实体。
                </b>
            </p>


            <!--</div>-->

            <!--<div class="box" id="box">-->


            <p style="margin-top: 20px"></p>
            <!--<div style="height: 1000px">-->
            <!--<img src="/static/media_img/2.jfif" class="" alt="" width="100%" height="250px">-->
            <div id="benner">
                <div class="img">
                    <img src="/static/media_img/1.png" class="imga active" width="100%" height="250px" href="#">
                    <img src="/static/media_img/3.jpg" class="imga" width="100%" height="250px">
                    <img src="/static/media_img/4.jpg" class="imga" width="100%" height="250px">
                    <img src="/static/media_img/5.jpg" class="imga" width="100%" height="250px">
                </div>
                <ul class="title">
                    <li class="nr active"></li>
                    <li class="nr"></li>
                    <li class="nr"></li>
                    <li class="nr"></li>
                </ul>
            </div>


            <!--</div>-->
            <!--<p style="margin-top: 5px"></p>-->
            <div style="text-align: center;margin: 0 auto;">
                <button href="https://www.baidu.com" value="免费上网"
                        style="padding: 5px;border-radius: 20px;padding: 10px 10px;background-color: #ea222b;color: #fff;width: 80%;"
                        class="btn" onclick="count(3)" id="btn">
                    点此免费上网
                </button>
            </div>
        </div>
    </div>

</section>


<script src="/static/dist/js/ckin.js"></script>
<script>
    window.onload = function () {
        benner('#benner', '.nr', '.imga')

        function benner(parent, controller, mod) {

            var num = 0;
            var controller = $(controller);
            var mod = $(mod);
            var benner = $(parent);
            var autoPlayTime = 1500;
            var imgNum = mod.length - 1;
            var auto;

            autoPlay();

            //根据传进来的名字获取这个名字所对应的对象
            function $(name) {
                if (name[0] == '#') {
                    return document.getElementById(name.substr(1));
                } else if (name[0] == '.') {
                    return document.getElementsByClassName(name.substr(1));
                } else {
                    return document.getElementsByTagName(name);
                }
            }

            //实现鼠标划过圆点,变化图片的效果
            //function change(controller, mod){
            //遍历控制器,绑定鼠标划过事件
            for (var i = 0; i < controller.length; i++) {
                //给控制器加个索引,并把i值赋值给索引
                controller[i].index = i;
                //给所有的控制器都加划过事件
                controller[i].onmouseover = function () {
                    for (var j = 0; j < controller.length; j++) {
                        //将所有控制器改为默认样式
                        controller[j].className = 'nr';
                    }
                    //改变所选的控制器样式
                    this.className = 'nr active';
                    //将模型改为默认样式
                    for (var x = 0; x < mod.length; x++) {
                        mod[x].className = 'imga';
                    }
                    //改变所选控制器对应的模型的样式
                    mod[this.index].className = 'imga active';
                }
            }
            //}
            //绑定鼠标移入,暂停播放图片
            benner.onmouseover = function () {
                clearInterval(auto);
            }
            //绑定鼠标离开,继续播放
            benner.onmouseleave = function () {
                autoPlay();
            }

            //指定播放那个图片
            function play(num) {
                for (var j = 0; j < controller.length; j++) {
                    controller[j].className = 'nr';
                }
                controller[num].className = 'nr active';
                for (var x = 0; x < mod.length; x++) {
                    mod[x].className = 'imga';
                }
                mod[num].className = 'imga active';
            }

            //自动播放
            function autoPlay() {
                auto = setInterval(function () {
                    if (num > imgNum) {
                        num = 0;
                    }
                    play(num);
                    num++;
                }, autoPlayTime)
            }
        }

    }

</script>


<script type="text/javascript">

    let time;
    let btn = document.getElementById('btn');

    function count(time) {
        btn.setAttribute("disabled", true);
        setTimeout(function () {
            count(time);
        }, 1000);
        if (time <= 0) {
            btn.innerHTML = '连接成功';
            btn.style.background = "#01ff70";
            return;
        }

        time--;

        // console.log(btn.innerHTML);
        // btn.val(time);
        btn.innerHTML = '连接中...' + "  (" + time + ")";
        //console.log(btn.html())
        console.log(time);
    }
</script>

</body>
</html>
